home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 2: CDPD 1
/
Almathera Ten on Ten - Disc 2: CDPD 1.iso
/
pd
/
376-400
/
376
/
plotter
/
src
/
makemenu.c
< prev
next >
Wrap
Text File
|
1995-03-14
|
5KB
|
122 lines
/********************************************************************/
/**** ****/
/**** ****/
/**** Program : MakeMenu für Plotter ****/
/**** ****/
/**** Version : 3.71 ****/
/**** ****/
/**** Erstversion : 30.04.1990 ****/
/**** ****/
/**** Letzte Änderung : 05.08.1990 ****/
/**** ****/
/**** Compiliert mit : siehe MAKEFILE ****/
/**** ****/
/**** Gelinkt mit : siehe MAKEFILE ****/
/**** ****/
/********************************************************************/
/**** ****/
/**** ****/
/**** Copyright by Rüdiger Dreier ****/
/**** ****/
/**** ****/
/********************************************************************/
#ifdef DEBUG
#include "Plotter.h"
#include <proto/tool.h>
#endif
#include <string.h>
#include <devices/printer.h>
#include <intuition/intuitionbase.h>
#include <graphics/regions.h>
#include <proto/mathieeedoubbas.h>
#include <proto/mathieeedoubtrans.h>
#include <proto/layers.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <exec/memory.h>
#include <exec/tasks.h>
#include <libraries/dosextens.h>
#include <dos.h>
struct Menu *Menu;
struct MenuItem *Item[7]; /* Zum Sichern der Zeiger */
VOID MakeMenu(VOID)
{
struct MenuItem *item;
SHORT i;
/* Damit das Menu breit genug wird */
for(i=0;i<=9;i++)
{
strcpy(SubMenuTitle[i],"123456789012345");
}
Menu=AddMenu(Menu," C-Plot",MENUENABLED);
item=AddItem(Menu,"Genauigkeit",ITEMTEXT|ITEMENABLED|HIGHCOMP,0);
((struct IntuiText *)item->ItemFill)->FrontPen=FARBE2;
item=AddSub(Menu," klein",ITEMTEXT|ITEMENABLED|HIGHCOMP|CHECKIT|COMMSEQ,'1');
item->MutualExclude=6;
item=AddSub(Menu," mittel",ITEMTEXT|ITEMENABLED|HIGHCOMP|CHECKIT|CHECKED|COMMSEQ,'2');
item->MutualExclude=5;
item=AddSub(Menu," groß",ITEMTEXT|ITEMENABLED|HIGHCOMP|CHECKIT|COMMSEQ,'3');
item->MutualExclude=3;
AddItem(Menu,"Intervall",ITEMTEXT|ITEMENABLED|HIGHCOMP|COMMSEQ,'I');
AddItem(Menu,"Löschen",ITEMTEXT|ITEMENABLED|HIGHCOMP,0);
AddItem(Menu,"Drucken",ITEMTEXT|ITEMENABLED|HIGHCOMP|COMMSEQ,'D');
AddItem(Menu,"Bereich m. Maus",ITEMTEXT|ITEMENABLED|HIGHCOMP,0);
AddItem(Menu,"Konstanten",ITEMTEXT|ITEMENABLED|HIGHCOMP|COMMSEQ,'K');
AddItem(Menu,"About",ITEMTEXT|ITEMENABLED|HIGHCOMP|COMMSEQ,'A');
AddItem(Menu,"ENDE",ITEMTEXT|ITEMENABLED|HIGHCOMP|COMMSEQ,'Q');
AddMenu(Menu," Funktion",MENUENABLED);
Item[0]= AddItem(Menu,"Ändern",ITEMTEXT|ITEMENABLED|HIGHCOMP,0);
AddSub(Menu,SubMenuTitle[0],ITEMTEXT|ITEMENABLED|HIGHCOMP,0);
AddSub(Menu,SubMenuTitle[1],ITEMTEXT|ITEMENABLED|HIGHCOMP,0);
AddSub(Menu,SubMenuTitle[2],ITEMTEXT|ITEMENABLED|HIGHCOMP,0);
AddSub(Menu,SubMenuTitle[3],ITEMTEXT|ITEMENABLED|HIGHCOMP,0);
AddSub(Menu,SubMenuTitle[4],ITEMTEXT|ITEMENABLED|HIGHCOMP,0);
AddSub(Menu,SubMenuTitle[5],ITEMTEXT|ITEMENABLED|HIGHCOMP,0);
AddSub(Menu,SubMenuTitle[6],ITEMTEXT|ITEMENABLED|HIGHCOMP,0);
AddSub(Menu,SubMenuTitle[7],ITEMTEXT|ITEMENABLED|HIGHCOMP,0);
AddSub(Menu,SubMenuTitle[8],ITEMTEXT|ITEMENABLED|HIGHCOMP,0);
AddSub(Menu,SubMenuTitle[9],ITEMTEXT|ITEMENABLED|HIGHCOMP,0);
Item[1]=AddItem(Menu,"Funktion",ITEMTEXT|ITEMENABLED|HIGHCOMP,0);
Item[1]->SubItem=Item[0]->SubItem;
Item[2]=AddItem(Menu,"1. Abl. Num.",ITEMTEXT|ITEMENABLED|HIGHCOMP,0);
Item[2]->SubItem=Item[0]->SubItem;
Item[3]=AddItem(Menu,"2. Abl. Num.",ITEMTEXT|ITEMENABLED|HIGHCOMP,0);
Item[3]->SubItem=Item[0]->SubItem;
AddItem(Menu,"------------",ITEMTEXT,0);
Item[4]=AddItem(Menu,"1. Abl. Sym.",ITEMTEXT|ITEMENABLED|HIGHCOMP,0);
Item[4]->SubItem=Item[0]->SubItem;
Item[5]=AddItem(Menu,"2. Abl. Sym.",ITEMTEXT|ITEMENABLED|HIGHCOMP,0);
Item[5]->SubItem=Item[0]->SubItem;
Item[6]=AddItem(Menu,"Diskussion",ITEMTEXT|ITEMENABLED|HIGHCOMP,0);
Item[6]->SubItem=Item[0]->SubItem;
AddMenu(Menu," Größe",MENUENABLED);
item=AddItem(Menu," 640 x 256",ITEMTEXT|ITEMENABLED|HIGHCOMP|CHECKIT|CHECKED,0);
item->MutualExclude=2;
item=AddItem(Menu," 1000 x 300",ITEMTEXT|ITEMENABLED|HIGHCOMP|CHECKIT,0);
item->MutualExclude=1;
}
VOID __asm ReMakeMenu(register __a0 struct Window *Window)
{
SHORT i;
for(i=1;i<=6;i++)
{
Item[i]->SubItem=0;
}
ClearMenu(Window->MenuStrip);
ClearMenuStrip(Window);
}